package buyers;


import java.io.*;

public class BuyersDataWrite {
    BuyersDAOArrayList buyersData = new BuyersDAOArrayList();
    public void DataWrite(BuyersDataRead BDR){
        buyersData = BDR.getBuyersData();
        BufferedWriter out;
        try {
            out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("买家账号信息.txt"),"utf-8"));
            for (Buyer B:buyersData.getBuyerArrayList()) {
                out.write(B.toString());
            }
            out.close();
        }  catch (IOException e) {
            e.printStackTrace();
        }

    }


}
